package com.kamenrider.adventureaffiliated.procedures;

import net.minecraft.world.level.LevelAccessor;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import com.kamenrider.adventureaffiliated.procedures.AnotherBuildHenshinProcedure;

public class AnotherBuildwatchDangYouJianDianJiKongQiShiShiTiDeWeiZhiProcedure {
    public static void execute(LevelAccessor world, Entity entity,ItemStack itemstack) {
        if (entity == null) return;
        
        // 确保实体是玩家
        if (entity instanceof Player) {
            Player player = (Player) entity;
            player.getCooldowns().addCooldown(itemstack.getItem(), 30);

            // 调用变身过程
            AnotherBuildHenshinProcedure.execute(player);
        }
    }
}